﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Text;
namespace Chizx.Web.companys
{
    public partial class Show : Page
    {        
        		public string strid=""; 
		protected void Page_Load(object sender, EventArgs e)
                {
                    if (null == Session["UserEntity"])
                    {
                        Response.Redirect("/e/Login.aspx");
                    }
			if (!Page.IsPostBack)
			{
				if (Request.Params["id"] != null && Request.Params["id"].Trim() != "")
				{
					strid = Request.Params["id"];
					int zcom_id=(Convert.ToInt32(strid));
					ShowInfo(zcom_id);
				}
			}
		}
		
	private void ShowInfo(int zcom_id)
	{
		Chizx.BLL.CompanysBll bll=new Chizx.BLL.CompanysBll();
		Chizx.Model.CompanysModel model=bll.GetModel(zcom_id);
		this.lblzcom_id.Text=model.zcom_id.ToString();
		this.lblzcom_name.Text=model.zcom_name;
		this.lblzcom_address.Text=model.zcom_address;
		this.lblzcom_desc.Text=model.zcom_desc;
		this.lblzcom_applynum.Text=model.zcom_applynum.ToString();
		this.lblzcom_passnum.Text=model.zcom_passnum.ToString();
		this.lblzcom_neednum.Text=model.zcom_neednum.ToString();
		this.lblzcom_createdate.Text=model.zcom_createdate.ToString();
        this.lblzcom_status.Text = model.zcom_status == "c0" ? "在招中" : (model.zcom_status == "c1" ? "已结束" : "未知状态");
        //写入系统日志
        if (Session["UserEntity"] == null)
        {
            Response.Redirect("/e/Login.aspx");
        }
        else
        {
            Chizx.Model.UserModel sbmmodel = (Chizx.Model.UserModel)Session["UserEntity"];
            Chizx.BLL.SystemLogBll sbll = new Chizx.BLL.SystemLogBll();
            Chizx.Model.SystemLogModel slm = new Chizx.Model.SystemLogModel();
            slm.zu_id = sbmmodel.zu_id;
            slm.zl_dowhen = DateTime.Now;
            slm.zl_dowhat = "查看招聘单位信息";
            slm.zl_dotype = "2";//0:Test,1:Auth,2:Read,3:Write,4:Del,5:Inpor
            slm.zl_dodesc = "操作成功";
            sbll.Add(slm);
        }
	}


    }
}
